package com.tzy.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.tzy.dao.OrderDetailMapper;
import com.tzy.entity.OrderDetail;

@Service
@Transactional
public class OrderDetailServiceImpl implements OrderDetailService{
	@Autowired
	private OrderDetailMapper odm;

	@Override
	public int addCartByUser_id(OrderDetail oD) {
		return this.odm.addCartByUser_id(oD);
	}

	@Override
	public List<OrderDetail> selectCartByUser_id(Integer user_id) {
		return this.odm.selectCartByUser_id(user_id);
	}

	@Override
	public int deleteOrderDetailById(Integer id) {
		return this.odm.deleteOrderDetailById(id);
	}

}
